﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RIDA.Globals;
using RIDA.Globals.Interfaces;
using System.Windows;

namespace RIDA.DiagramDesigner.ViewModel
{
    [Serializable]
    public abstract class DiagramElementViewModelBase : ViewModelBase, IDiagramElementViewModel
    {
        public DiagramElementViewModelBase()
        {
            Width = double.NaN; //SizeToContent impl
            Height = double.NaN;//SizeToContent impl
        }
        private double _left;
        public double Left
        {
            get { return _left; }
            set { _left = value; OnNotifyPropertyChanged("Left"); }
        }

        private double _top;
        public double Top
        {
            get { return _top; }
            set { _top = value; OnNotifyPropertyChanged("Top"); }
        }

        private double _width;
        public double Width
        {
            get { return _width; }
            set { _width = value; OnNotifyPropertyChanged("Width"); }
        }

        private double _height;
        public double Height
        {
            get { return _height; }
            set { _height = value; OnNotifyPropertyChanged("Height"); }
        }

        private bool _sel;
        public bool Selected
        {
            get { return _sel; }
            set
            {
                _sel = value;
                OnNotifyPropertyChanged("Selected");
            }

        }

        private bool _isHitVisible = true;
        public bool IsHitVisible
        {
            get { return _isHitVisible; }
            set { _isHitVisible = value; OnNotifyPropertyChanged("IsHitVisible"); }
        }

        private Rect _bounding;

        public Rect BoundingRect
        {
            get { return _bounding; }
            set { _bounding = value; OnNotifyPropertyChanged("BoundingRect"); }
        }
    }
}
